<?php
/* MENU */

// Doit-on afficher les menus au clic ou au survol de la souris ?
if(config("automenus") == 1) $mdisplay = "onmouseover"; else $mdisplay = "onclick";

?>

<div id="mainmenu">
	
	<ul>
			<li onclick="js_direct('index.php');">
				<?php say("accueil") ?>
			</li>
			
			<li id="lib" <?echo $mdisplay;?>="menu('lib','lib_menu');">
				<?php say("lib_library") ?>
			</li>
			
			<li id="fi" <?echo $mdisplay;?>="menu('fi','fi_menu');">
				<?php say("fi_finances") ?>
			</li>
			
			<li id="contacts" <?echo $mdisplay;?>="menu('contacts','contacts_menu');">
				<?php say("contacts") ?>
			</li>
			
			<li id='events' <?echo $mdisplay;?>="menu('events','events_menu');">
				<?php say("events") ?>
			</li>
			
			<?php if(config('files') == 1) {?>
			<li onclick="js_direct('index.php?d=files');">
				<?php say("files") ?>
			</li>
			<?php }?>
			
			<?php if(config('log') == 1 or $_config['auth'] == 1) {?>
			<li id="administration" <?echo $mdisplay;?>="menu('administration','administration_menu');">
				<?php say("administration") ?>
			</li>
			<?php }?>
	</ul>
	
	<!-- Sous-menu Bibliothèque -->
	<div id="lib_menu" class="menu_deroulant" style="display:none;">
		<ul>
			<li onclick="js_direct('index.php?d=lib');">
				<?php say("lib_list") ?>
			</li>
			<li onclick="js_direct('index.php?d=lib&p=new');">
				<?php say("lib_new"); ?>
			</li>
			<li onclick="js_direct('index.php?d=lib&p=search');">
				<?php say("lib_search") ?>
			</li>
			<li onclick="js_direct('index.php?d=lib&p=labels');">
				<?php say("lib_labels") ?>
			</li>
			<li onclick="js_direct('index.php?d=lib&p=tags');">
				<?php say("lib_tags") ?>
			</li>
			<li onclick="js_direct('index.php?d=lib&p=def');">
				<?php say("lib_def") ?>
			</li>
		</ul>
	</div>
	
	<!-- Sous-menu Finances -->
	<div id="fi_menu" class="menu_deroulant" style="display:none;">
		<ul>
			<li onclick="js_direct('index.php?d=fi');">
				<?php say("fi_list") ?>
			</li>
			<li onclick="js_direct('index.php?d=fi&p=op');">
				<?php say("fi_new") ?>
			</li>
			<li onclick="js_direct('index.php?d=fi&p=cat');">
				<?php say("fi_cat") ?>
			</li>
			<li onclick="js_direct('index.php?d=labels');">
				<?php say("fi_labels") ?>
			</li>
			<li onclick="js_direct('index.php?d=fi&p=cpt');">
				<?php say("fi_comptes") ?>
			</li>
			<li onclick="js_direct('index.php?d=fi&p=search');">
				<?php say("fi_search") ?>
			</li>
		</ul>
	</div>
	
	<!-- Sous-menu Contacts -->
	<div id="contacts_menu" class="menu_deroulant" style="display:none;">
		<ul>
			<li onclick="js_direct('index.php?d=list');">
				<?php say("liste") ?>
			</li>
			<li onclick="js_direct('index.php?d=new');">
					<?php say("nouveau"); ?>
			</li>
			<li onclick="js_direct('index.php?d=search');">
				<?php say("search") ?>
			</li>
			<li onclick="js_direct('index.php?d=labels');">
				<?php say("labels") ?>
			</li>
			<li onclick="js_direct('index.php?d=externe');">
				<?php say("externe") ?>
			</li>
		</ul>
	</div>
	
	<!-- Sous-menu Événements -->
	<div id="events_menu" class="menu_deroulant" style="display:none;">
		<ul>
			<li onclick="js_direct('index.php?d=events');">
				<?php say("events_liste") ?>
			</li>
			<li onclick="js_direct('index.php?d=calendrier');">
					<?php say("calendrier"); ?>
			</li>
			<li onclick="js_direct('index.php?d=eventslb');">
					<?php say("labels"); ?>
			</li>
		</ul>
	</div>
	
	<!-- Sous-menu Administration -->
	<div id="administration_menu" class="menu_deroulant" style="display:none;">
		<ul>
			<?php if(config('log') == 1) {?>
			<li onclick="js_direct('index.php?d=log');">
				<?php say("log") ?>
			</li>
			<?php }?>
			<li onclick="js_direct('index.php?d=maintenance');">
				<?php say('maintenance'); ?>
			</li>
			<?php if($_config['auth'] == 1) {?>
			<li onclick="js_direct('index.php?d=config');">
				<?php say("config") ?>
			</li>
			<li onclick="js_direct('index.php?d=users');">
				<?php say("users") ?>
			</li>
			<li onclick="js_direct('index.php?d=about');">
				<?php say("about") ?>
			</li>
			<li onclick="js_direct('index.php?d=phpinfo');">
				phpinfo
			</li>
			<li onclick="js_direct('index.php?auth=logout');">
				<?php say("auth_logout") ?>
			</li>
			<?php }?>
		</ul>
	</div>
	
</div>
